Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libc: fix nightly nucleo fail #223

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

mateusz-bloch
Copy link
Member

@mateusz-bloch mateusz-bloch commented Jul 12, 2023

Issue:
The following test cases have an extended execution time:

TEST(stdio_printf_cspn, c_ascii)
TEST(stdio_printf_cspn, c_non_ascii)
TEST(stdio_printf_cspn, s_ascii)

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: (list targets here).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

@mateusz-bloch mateusz-bloch force-pushed the mateusz-bloch/printf_optimization_nucleo branch from 16995e4 to ab15967 Compare July 17, 2023 08:51
@mateusz-bloch mateusz-bloch marked this pull request as ready for review July 17, 2023 08:51
Copy link
Contributor

@damianloew damianloew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can split those cases to decrease execution time for one test case.

Comment on lines 212 to 217
static char *test_intToAscii(int value)
{
char *str = malloc(2 * sizeof(char));
static char str[2];
str[0] = value;
str[1] = '\0';
return str;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfornutately as it's mentioned in our coding convention:
Screenshot from 2023-07-17 17-59-44

https://github.com/phoenix-rtos/phoenix-rtos-doc/blob/master/coding.md

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you can leave the previous approach.

@mateusz-bloch mateusz-bloch force-pushed the mateusz-bloch/printf_optimization_nucleo branch from dcc8352 to d1c9b37 Compare July 18, 2023 08:45
Copy link
Contributor

@damianloew damianloew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@damianloew damianloew merged commit 6610dea into master Jul 21, 2023
24 checks passed
@damianloew damianloew deleted the mateusz-bloch/printf_optimization_nucleo branch July 21, 2023 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants